<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@taglib prefix="shiro" uri="http://shiro.apache.org/tags" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="utf-8">
    <title>中央教育集团</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <!-- Le styles -->
    <link rel="stylesheet" href="/assets/css/style.css">
    <link rel="stylesheet" href="/assets/css/loader-style.css">
    <link rel="stylesheet" href="/assets/css/bootstrap.css">
    <link rel="stylesheet" type="text/css" href="/assets/js/progress-bar/number-pb.css">
    <%@include file="/static/common/commonHead.jsp" %>
    <script type="text/javascript" src="/static/js/ajaxForm/jquery.form.min.js"></script>
    <script type="text/javascript" src="/static/js/index/index.js"></script>
    <style type="text/css">
        canvas#canvas4 {
            position: relative;
            top: 20px;
        }
    </style>
    <![endif]-->
    <!-- Fav and touch icons -->
    <link rel="shortcut icon" href="/assets/ico/minus.png">
</head>
<body>
<!-- Preloader -->
<div id="preloader">
    <div id="status">&nbsp;</div>
</div>
<!-- TOP NAVBAR -->
<nav role="navigation" class="navbar navbar-static-top">
    <div class="container-fluid">
        <!-- Brand and toggle get grouped for better mobile display -->
        <div class="navbar-header">
            <button data-target="#bs-example-navbar-collapse-1" data-toggle="collapse" class="navbar-toggle"
                    type="button">
                <span class="entypo-menu"></span>
            </button>
            <button class="navbar-toggle toggle-menu-mobile toggle-left" type="button">
                <span class="entypo-list-add"></span>
            </button>
            <div id="logo-mobile" class="visible-xs">
                <h1>管理<span>v1.2</span></h1>
            </div>

        </div>


        <!-- Collect the nav links, forms, and other content for toggling -->
        <div id="bs-example-navbar-collapse-1" class="collapse navbar-collapse">
            <ul class="nav navbar-nav">
                <li class="dropdown">
                    <a data-toggle="dropdown" class="dropdown-toggle" href="#">
                        <i style="font-size:20px;" class="icon-conversation" data-url="email/view.do" onclick="sendSearchUrl(this)"></i>
                       <%-- <div class="noft-red">99</div>--%>
                    </a>


                   <%-- <ul style="margin: 11px 0 0 9px;" role="menu" class="dropdown-menu dropdown-wrap">
                        <li>
                            <a href="#">
                                <img alt="" class="img-msg img-circle"
                                     src="http://api.randomuser.me/portraits/thumb/men/1.jpg">小兄弟 <b>刚刚</b>
                            </a>
                        </li>
                    </ul>--%>
                </li>
            </ul>
            <!--日历-->
            <div id="nt-title-container" class="navbar-left running-text ">
                <ul class="date-top">
                    <li class="entypo-calendar " style="margin-right:5px" id="calendar"></li>
                    <li id="Date"></li>
                </ul>
                <!--时间-->
                <ul id="digital-clock" class="digital">
                    <li class="entypo-clock" style="margin-right:5px"></li>
                    <li class="hour"></li>
                    <li>:</li>
                    <li class="min"></li>
                    <li>:</li>
                    <li class="sec"></li>
                    <li class="meridiem"></li>
                </ul>
                <ul id="nt-title">
                    <li>
                        <iframe width="280" scrolling="no" height="19" frameborder="0" allowtransparency="true"
                                src="http://i.tianqi.com/index.php?c=code&id=1&color=%23FFFFFF&icon=1&py=yuexiuqu&wind=0&num=2&site=12"></iframe>
                    </li>
                    <li>
                        <iframe width="280" scrolling="no" height="19" frameborder="0" allowtransparency="true"
                                src="http://i.tianqi.com/index.php?c=code&id=1&color=%23FFFFFF&icon=1&py=haizhuqu&wind=0&num=2&site=12"></iframe>
                    </li>
                    <li>
                        <iframe width="280" scrolling="no" height="19" frameborder="0" allowtransparency="true"
                                src="http://i.tianqi.com/index.php?c=code&id=1&color=%23FFFFFF&icon=1&py=tianhequ&wind=0&num=2&site=12"></iframe>
                    </li>
                    </li>
                    <li>
                        <iframe width="280" scrolling="no" height="19" frameborder="0" allowtransparency="true"
                                src="http://i.tianqi.com/index.php?c=code&id=1&color=%23FFFFFF&icon=1&py=liwan&wind=0&num=2&site=12"></iframe>
                    </li>
                </ul>
            </div>


            <!--右侧头像相关信息-->

            <ul style="margin-right:0;" class="nav navbar-nav navbar-right">
                <li>
                    <a data-toggle="dropdown" class="dropdown-toggle" href="#">
                        <%-- <img alt="" class="admin-pic img-circle"
                              src="/static/upload/head/mm.jpg">--%>
                        <img alt="" class="admin-pic img-circle"
                             src="<shiro:principal property="head"/>">
                        <shiro:principal property="username"/>
                        <b class="caret"></b>
                    </a>
                    <ul style="margin-top:14px;" role="menu" class="dropdown-setting dropdown-menu">
                        <li>
                            <a href="#">
                                <span class="entypo-user"></span>&#160;&#160;<shiro:principal property="realname"/></a>
                        </li>
                        <li>
                            <a href="#">
                                <span class="entypo-vcard"></span>&#160;&#160;<shiro:principal property="email"/></a>
                        </li>

                        <li class="divider"></li>
                        <li>
                            <a href="#">
                                <span class="entypo-basket"></span>&#160;&#160; <a href="https://www.taobao.com"
                                                                                   target="_Blank">淘宝得你怀疑人生</a></a>
                        </li>
                        <%--<li>--%>
                        <%--<a href="#">--%>
                        <%--<span class="entypo-basket"></span>&#160;&#160; <a href="/menu/selectLocation.do"--%>
                        <%--target="_Blank">更改校区</a></a>--%>
                        <%--</li>--%>
                    </ul>
                </li>
            </ul>
        </div>
        <!-- /.navbar-collapse -->
    </div>
    <!-- /.container-fluid -->
</nav>

<!-- /END OF TOP NAVBAR -->

<!-- SIDE MENU -->
<div id="skin-select">
    <div id="logo">
        <h1>中央教育集团</h1>
    </div>

    <a id="toggle">
        <span class="entypo-menu"></span>
    </a>
    <div class="dark">
        <form action="#">
                <span>
                    <input type="text" name="search" value="" class="search rounded id_search"
                           placeholder="请选择菜单..." autofocus="">
                </span>
        </form>
    </div>
    <div class="search-hover">
        <form id="demo-2">
            <input type="search" placeholder="请选择菜单..." class="id_search">
        </form>
    </div>
    <div class="skin-part">
        <div id="tree-wrap">
            <div class="side-bar">
                <ul class="topnav menu-left-nest">
                    <li>
                        <a id="home"  class="tooltip-tip" onclick="sendSearchUrl(this)"
                           data-url="getHome.do" title="首页" text="主页">
                            <i class="icon-document-edit"></i><span>首页</span></a>
                    </li>
                    <c:forEach items="${sessionScope.MENUS}" var="entity">
                        <li>
                            <a class="tooltip-tip ajax-load" title="${entity.text}">
                                <i class="icon-window"></i>
                                <span>${entity.text}</span>
                                <div class="noft-blue">${fn:length(entity.children)}</div>
                            </a>
                            <ul>
                                <c:forEach items="${entity.children}" var="child">
                                    <li>
                                        <a class="tooltip-tip2 ajax-load" onclick="sendSearchUrl(this)"
                                           data-url="${child.url}" title="${child.text}">
                                            <i class="icon-document-edit"></i><span>${child.text}</span></a>
                                    </li>
                                </c:forEach>
                            </ul>
                        </li>
                    </c:forEach>
                    <li>
                        <a class="tooltip-tip ajax-load" href="/logout.do" title="退出"><i
                                class="icon-upload"></i><span>退出</span></a>
                    </li>
                </ul>
                <ul id="menu-showhide" class="topnav menu-left-nest">
                </ul>
            </div>
        </div>
    </div>
</div>
<!-- END OF SIDE MENU -->


<!--  PAPER WRAP -->
<div class="wrap-fluid">
    <div class="container-fluid paper-wrap bevel tlbr">
        <!-- CONTENT -->
        <!--TITLE -->
        <div class="row">
            <div id="paper-top">
                <div class="col-lg-3">
                    <h2 class="tittle-content-header">
                        <span id="contentTitle">首页
                            </span>
                    </h2>
                </div>
                <div class="col-lg-7">
                    <div class="devider-vertical visible-lg"></div>
                    <div class="tittle-middle-header">
                        <div class="alert">
                            <button type="button" class="close" data-dismiss="alert">×</button>
                            <span class="tittle-alert entypo-info-circled"></span>
                            欢迎回来,&nbsp;
                            <strong>
                                <shiro:principal property="username"></shiro:principal>
                            </strong>&nbsp;&nbsp;你上一次登录时间为<shiro:principal property="lastLogin"></shiro:principal>
                        </div>
                    </div>
                </div>
                <div>
                    <li>
                        <button type="button" class="btn btn-success" onclick="onState()">快速签到</button>
                        <button type="button" class="btn btn-danger" onclick="downState()">快速签退</button>
                    </li>
                </div>
            </div>
        </div>
        <%--点击菜单导航显示内容--%>
        <div class="row">
            <div class="col-lg-10">
                <div id="myContainer">

                </div>
            </div>
        </div>
        <%--数据库备份显示--%>
        <div class="content-wrap" hidden="true" id="database">
            <div class="row">
                <div class="col-sm-6">
                    <div class="nest" id="basicClose">
                        <div class="title-alt">
                            <h6>数据库备份</h6>
                        </div>
                        <div class="body-nest" id="basic">
                            <center><h3>备份数据库可能需要较长时间</h3>
                                <center><h3>请耐心等待!</h3></center>
                                <hr>
                                <div class="form_center">
                                    <button class="btn btn-info" onclick="backup()">备份</button>
                                </div>
                            </center>
                        </div>
                    </div>
                </div>
                <div class="col-sm-6">
                    <div class="nest">
                        <div class="title-alt">
                            <h6>数据库还原</h6>
                        </div>
                        <div class="body-nest">
                            <center><h3><font color="red">注意!</font></h3></center>
                            <center><h3>还原数据库会将原来数据<font color="red">删除</font>!</h3></center>
                            <hr>
                            <div class="form_center">
                                <form action="/database/recover.do" enctype="multipart/form-data" id="recoverForm"
                                      method="post">
                                    <div class="form-group">
                                        <input type="file" name="file">
                                    </div>
                                    <input type="submit" class="btn btn-danger">还原数据库</input>
                                </form>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<!--/ TITLE -->

<!--主页头信息-->
<!-- BREADCRUMB -->
<%--<ul id="breadcrumb">
    <li>
        <span class="entypo-home"></span>
    </li>
    <li><i class="fa fa-lg fa-angle-right"></i>
    </li>
    <li><a href="#" title="Sample page 1">家</a>
    </li>
    <li><i class="fa fa-lg fa-angle-right"></i>
    </li>
    <li><a href="#" title="Sample page 1">1111111</a>
    </li>
</ul>--%>
</div>
</div>
<script src="/assets/js/progress-bar/src/jquery.velocity.min.js"></script>
<script src="/assets/js/progress-bar/number-pb.js"></script>
<script type="text/javascript" src="/assets/js/bootstrap.js"></script>
<script type="text/javascript" src="/assets/js/load.js"></script>
<script type="text/javascript" src="/assets/js/main.js"></script>
<script src="/assets/js/jhere-custom.js"></script>
<!--时间显示-->
<script type="text/javascript">
    var output, started, duration, desired;

    // Constants
    duration = 5000;
    desired = '50';

    // Initial setup
    output = $('#speed');
    started = new Date().toLocaleDateString();

    // Animate!
    animationTimer = setInterval(function () {
        // If the value is what we want, stop animating
        // or if the duration has been exceeded, stop animating
        if (output.text().trim() === desired || new Date().getTime() - started > duration) {
            // Generate a random string to use for the next animation step
            output.text('' + Math.floor(Math.random() * 60)
            );

        } else {
            // Generate a random string to use for the next animation step
            output.text('' + Math.floor(Math.random() * 120)
            );
        }
    }, 5000);
</script>

<div style="text-align:center;">
    <p>© 中央教育集团</p>
</div>
</body>

</html>


